﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Provider;
using System.Web.Configuration;
using System.Web;
using Dienthoai.Entities;
using Dienthoai.Data;
using Dienthoai.Data.Bases;

#endregion

namespace Dienthoai.Data
{
	/// <summary>
	/// This class represents the Data source repository and gives access to all the underlying providers.
	/// </summary>
	[CLSCompliant(true)]
	public sealed class DataRepository 
	{
		private static volatile NetTiersProvider _provider = null;
        private static volatile NetTiersProviderCollection _providers = null;
		private static volatile NetTiersServiceSection _section = null;
		private static volatile Configuration _config = null;
        
        private static object SyncRoot = new object();
				
		private DataRepository()
		{
		}
		
		#region Public LoadProvider
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        public static void LoadProvider(NetTiersProvider provider)
        {
			LoadProvider(provider, false);
        }
		
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        /// <param name="setAsDefault">ability to set any valid provider as the default provider for the DataRepository.</param>
		public static void LoadProvider(NetTiersProvider provider, bool setAsDefault)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (_providers == null)
			{
				lock(SyncRoot)
				{
            		if (_providers == null)
						_providers = new NetTiersProviderCollection();
				}
			}
			
            if (_providers[provider.Name] == null)
            {
                lock (_providers.SyncRoot)
                {
                    _providers.Add(provider);
                }
            }

            if (_provider == null || setAsDefault)
            {
                lock (SyncRoot)
                {
                    if(_provider == null || setAsDefault)
                         _provider = provider;
                }
            }
        }
		#endregion 
		
		///<summary>
		/// Configuration based provider loading, will load the providers on first call.
		///</summary>
		private static void LoadProviders()
        {
            // Avoid claiming lock if providers are already loaded
            if (_provider == null)
            {
                lock (SyncRoot)
                {
                    // Do this again to make sure _provider is still null
                    if (_provider == null)
                    {
                        // Load registered providers and point _provider to the default provider
                        _providers = new NetTiersProviderCollection();

                        ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
						_provider = _providers[NetTiersSection.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException("Unable to load default NetTiersProvider");
                        }
                    }
                }
            }
        }

		/// <summary>
        /// Gets the provider.
        /// </summary>
        /// <value>The provider.</value>
        public static NetTiersProvider Provider
        {
            get { LoadProviders(); return _provider; }
        }

		/// <summary>
        /// Gets the provider collection.
        /// </summary>
        /// <value>The providers.</value>
        public static NetTiersProviderCollection Providers
        {
            get { LoadProviders(); return _providers; }
        }
		
		/// <summary>
		/// Creates a new <see cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public TransactionManager CreateTransaction()
		{
			return _provider.CreateTransaction();
		}

		#region Configuration

		/// <summary>
		/// Gets a reference to the configured NetTiersServiceSection object.
		/// </summary>
		public static NetTiersServiceSection NetTiersSection
		{
			get
			{
				// Try to get a reference to the default <netTiersService> section
				_section = WebConfigurationManager.GetSection("netTiersService") as NetTiersServiceSection;

				if ( _section == null )
				{
					// otherwise look for section based on the assembly name
					_section = WebConfigurationManager.GetSection("Dienthoai.Data") as NetTiersServiceSection;
				}

				#region Design-Time Support

				if ( _section == null )
				{
					// lastly, try to find the specific NetTiersServiceSection for this assembly
					foreach ( ConfigurationSection temp in Configuration.Sections )
					{
						if ( temp is NetTiersServiceSection )
						{
							_section = temp as NetTiersServiceSection;
							break;
						}
					}
				}

				#endregion Design-Time Support
				
				if ( _section == null )
				{
					throw new ProviderException("Unable to load NetTiersServiceSection");
				}

				return _section;
			}
		}

		#region Design-Time Support

		/// <summary>
		/// Gets a reference to the application configuration object.
		/// </summary>
		public static Configuration Configuration
		{
			get
			{
				if ( _config == null )
				{
					// load specific config file
					if ( HttpContext.Current != null )
					{
						_config = WebConfigurationManager.OpenWebConfiguration("~");
					}
					else
					{
						String configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.Replace(".config", "").Replace(".temp", "");

						// check for design mode
						if ( configFile.ToLower().Contains("devenv.exe") )
						{
							_config = GetDesignTimeConfig();
						}
						else
						{
							_config = ConfigurationManager.OpenExeConfiguration(configFile);
						}
					}
				}

				return _config;
			}
		}

		private static Configuration GetDesignTimeConfig()
		{
			ExeConfigurationFileMap configMap = null;
			Configuration config = null;
			String path = null;

			// Get an instance of the currently running Visual Studio IDE.
			EnvDTE80.DTE2 dte = (EnvDTE80.DTE2) System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0");
			
			if ( dte != null )
			{
				dte.SuppressUI = true;

				EnvDTE.ProjectItem item = dte.Solution.FindProjectItem("web.config");
				if ( item != null )
				{
					if (!item.ContainingProject.FullName.ToLower().StartsWith("http:"))
               {
                  System.IO.FileInfo info = new System.IO.FileInfo(item.ContainingProject.FullName);
                  path = String.Format("{0}\\{1}", info.Directory.FullName, item.Name);
                  configMap = new ExeConfigurationFileMap();
                  configMap.ExeConfigFilename = path;
               }
               else
               {
                  configMap = new ExeConfigurationFileMap();
                  configMap.ExeConfigFilename = item.get_FileNames(0);
               }}

				/*
				Array projects = (Array) dte2.ActiveSolutionProjects;
				EnvDTE.Project project = (EnvDTE.Project) projects.GetValue(0);
				System.IO.FileInfo info;

				foreach ( EnvDTE.ProjectItem item in project.ProjectItems )
				{
					if ( String.Compare(item.Name, "web.config", true) == 0 )
					{
						info = new System.IO.FileInfo(project.FullName);
						path = String.Format("{0}\\{1}", info.Directory.FullName, item.Name);
						configMap = new ExeConfigurationFileMap();
						configMap.ExeConfigFilename = path;
						break;
					}
				}
				*/
			}

			config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
			return config;
		}

		#endregion Design-Time Support

		#endregion Configuration

		#region Connections

		/// <summary>
		/// Gets a reference to the ConnectionStringSettings collection.
		/// </summary>
		public static ConnectionStringSettingsCollection ConnectionStrings
		{
			get
			{
					// use default ConnectionStrings if _section has already been discovered
					if ( _config == null && _section != null )
					{
						return WebConfigurationManager.ConnectionStrings;
					}
					
					return Configuration.ConnectionStrings.ConnectionStrings;
			}
		}

		// dictionary of connection providers
		private static Dictionary<String, ConnectionProvider> _connections;

		/// <summary>
		/// Gets the dictionary of connection providers.
		/// </summary>
		public static Dictionary<String, ConnectionProvider> Connections
		{
			get
			{
				if ( _connections == null )
				{
					lock (SyncRoot)
                	{
						if (_connections == null)
						{
							_connections = new Dictionary<String, ConnectionProvider>();
		
							// add a connection provider for each configured connection string
							foreach ( ConnectionStringSettings conn in ConnectionStrings )
							{
								_connections.Add(conn.Name, new ConnectionProvider(conn.Name, conn.ConnectionString));
							}
						}
					}
				}

				return _connections;
			}
		}

		/// <summary>
		/// Adds the specified connection string to the map of connection strings.
		/// </summary>
		/// <param name="connectionStringName">The connection string name.</param>
		/// <param name="connectionString">The provider specific connection information.</param>
		public static void AddConnection(String connectionStringName, String connectionString)
		{
			lock (SyncRoot)
            {
				Connections.Remove(connectionStringName);
				ConnectionProvider connection = new ConnectionProvider(connectionStringName, connectionString);
				Connections.Add(connectionStringName, connection);
			}
		}

		/// <summary>
		/// Provides ability to switch connection string at runtime.
		/// </summary>
		public sealed class ConnectionProvider
		{
			private NetTiersProvider _provider;
			private NetTiersProviderCollection _providers;
			private String _connectionStringName;
			private String _connectionString;


			/// <summary>
			/// Initializes a new instance of the ConnectionProvider class.
			/// </summary>
			/// <param name="connectionStringName">The connection string name.</param>
			/// <param name="connectionString">The provider specific connection information.</param>
			public ConnectionProvider(String connectionStringName, String connectionString)
			{
				_connectionString = connectionString;
				_connectionStringName = connectionStringName;
			}

			/// <summary>
			/// Gets the provider.
			/// </summary>
			public NetTiersProvider Provider
			{
				get { LoadProviders(); return _provider; }
			}

			/// <summary>
			/// Gets the provider collection.
			/// </summary>
			public NetTiersProviderCollection Providers
			{
				get { LoadProviders(); return _providers; }
			}

			/// <summary>
			/// Instantiates the configured providers based on the supplied connection string.
			/// </summary>
			private void LoadProviders()
			{
				DataRepository.LoadProviders();

				// Avoid claiming lock if providers are already loaded
				if ( _providers == null )
				{
					lock ( SyncRoot )
					{
						// Do this again to make sure _provider is still null
						if ( _providers == null )
						{
							// apply connection information to each provider
							for ( int i = 0; i < NetTiersSection.Providers.Count; i++ )
							{
								NetTiersSection.Providers[i].Parameters["connectionStringName"] = _connectionStringName;
								// remove previous connection string, if any
								NetTiersSection.Providers[i].Parameters.Remove("connectionString");

								if ( !String.IsNullOrEmpty(_connectionString) )
								{
									NetTiersSection.Providers[i].Parameters["connectionString"] = _connectionString;
								}
							}

							// Load registered providers and point _provider to the default provider
							_providers = new NetTiersProviderCollection();

							ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
							_provider = _providers[NetTiersSection.DefaultProvider];
						}
					}
				}
			}
		}

		#endregion Connections

		#region Static properties
		
		#region ProductsProductProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsProduct"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsProductProviderBase ProductsProductProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsProductProvider;
			}
		}
		
		#endregion
		
		#region CommentProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Comment"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static CommentProviderBase CommentProvider
		{
			get 
			{
				LoadProviders();
				return _provider.CommentProvider;
			}
		}
		
		#endregion
		
		#region ProductsTypeProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsTypeProviderBase ProductsTypeProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsTypeProvider;
			}
		}
		
		#endregion
		
		#region ProductsClassProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsClass"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsClassProviderBase ProductsClassProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsClassProvider;
			}
		}
		
		#endregion
		
		#region MembersProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Members"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static MembersProviderBase MembersProvider
		{
			get 
			{
				LoadProviders();
				return _provider.MembersProvider;
			}
		}
		
		#endregion
		
		#region SupplyProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Supply"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static SupplyProviderBase SupplyProvider
		{
			get 
			{
				LoadProviders();
				return _provider.SupplyProvider;
			}
		}
		
		#endregion
		
		#region UserProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="User"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UserProviderBase UserProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UserProvider;
			}
		}
		
		#endregion
		
		#region ProductsCategoryProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsCategory"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsCategoryProviderBase ProductsCategoryProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsCategoryProvider;
			}
		}
		
		#endregion
		
		#region ProductsSimcardProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsSimcard"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsSimcardProviderBase ProductsSimcardProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsSimcardProvider;
			}
		}
		
		#endregion
		
		#region ProductsBrandProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProductsBrand"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProductsBrandProviderBase ProductsBrandProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProductsBrandProvider;
			}
		}
		
		#endregion
		
		#region NewsImageProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="NewsImage"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static NewsImageProviderBase NewsImageProvider
		{
			get 
			{
				LoadProviders();
				return _provider.NewsImageProvider;
			}
		}
		
		#endregion
		
		#region OrdersOrderProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="OrdersOrder"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static OrdersOrderProviderBase OrdersOrderProvider
		{
			get 
			{
				LoadProviders();
				return _provider.OrdersOrderProvider;
			}
		}
		
		#endregion
		
		#region NewsItemProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="NewsItem"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static NewsItemProviderBase NewsItemProvider
		{
			get 
			{
				LoadProviders();
				return _provider.NewsItemProvider;
			}
		}
		
		#endregion
		
		#region NewsCategoryProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="NewsCategory"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static NewsCategoryProviderBase NewsCategoryProvider
		{
			get 
			{
				LoadProviders();
				return _provider.NewsCategoryProvider;
			}
		}
		
		#endregion
		
		#region OrdersDetailsProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="OrdersDetails"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static OrdersDetailsProviderBase OrdersDetailsProvider
		{
			get 
			{
				LoadProviders();
				return _provider.OrdersDetailsProvider;
			}
		}
		
		#endregion
		
		#region OrderImportProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="OrderImport"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static OrderImportProviderBase OrderImportProvider
		{
			get 
			{
				LoadProviders();
				return _provider.OrderImportProvider;
			}
		}
		
		#endregion
		
		#region UserLogProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UserLog"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UserLogProviderBase UserLogProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UserLogProvider;
			}
		}
		
		#endregion
		
		#region OrderImportDetailProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="OrderImportDetail"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static OrderImportDetailProviderBase OrderImportDetailProvider
		{
			get 
			{
				LoadProviders();
				return _provider.OrderImportDetailProvider;
			}
		}
		
		#endregion
		
		
		#endregion
	}
	
	#region Query/Filters
		
	#region ProductsProductFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsProduct"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsProductFilters : ProductsProductFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsProductFilters class.
		/// </summary>
		public ProductsProductFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsProductFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsProductFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsProductFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsProductFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsProductFilters
	
	#region ProductsProductQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsProductParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsProduct"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsProductQuery : ProductsProductParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsProductQuery class.
		/// </summary>
		public ProductsProductQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsProductQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsProductQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsProductQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsProductQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsProductQuery
		
	#region CommentFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Comment"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CommentFilters : CommentFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CommentFilters class.
		/// </summary>
		public CommentFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the CommentFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CommentFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CommentFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CommentFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CommentFilters
	
	#region CommentQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="CommentParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Comment"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CommentQuery : CommentParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CommentQuery class.
		/// </summary>
		public CommentQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the CommentQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CommentQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CommentQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CommentQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CommentQuery
		
	#region ProductsTypeFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsType"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsTypeFilters : ProductsTypeFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsTypeFilters class.
		/// </summary>
		public ProductsTypeFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsTypeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsTypeFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsTypeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsTypeFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsTypeFilters
	
	#region ProductsTypeQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsTypeParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsType"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsTypeQuery : ProductsTypeParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsTypeQuery class.
		/// </summary>
		public ProductsTypeQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsTypeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsTypeQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsTypeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsTypeQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsTypeQuery
		
	#region ProductsClassFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsClass"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsClassFilters : ProductsClassFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsClassFilters class.
		/// </summary>
		public ProductsClassFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsClassFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsClassFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsClassFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsClassFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsClassFilters
	
	#region ProductsClassQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsClassParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsClass"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsClassQuery : ProductsClassParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsClassQuery class.
		/// </summary>
		public ProductsClassQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsClassQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsClassQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsClassQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsClassQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsClassQuery
		
	#region MembersFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Members"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class MembersFilters : MembersFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the MembersFilters class.
		/// </summary>
		public MembersFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the MembersFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public MembersFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the MembersFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public MembersFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion MembersFilters
	
	#region MembersQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="MembersParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Members"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class MembersQuery : MembersParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the MembersQuery class.
		/// </summary>
		public MembersQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the MembersQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public MembersQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the MembersQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public MembersQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion MembersQuery
		
	#region SupplyFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Supply"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SupplyFilters : SupplyFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SupplyFilters class.
		/// </summary>
		public SupplyFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the SupplyFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SupplyFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SupplyFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SupplyFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SupplyFilters
	
	#region SupplyQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SupplyParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Supply"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SupplyQuery : SupplyParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SupplyQuery class.
		/// </summary>
		public SupplyQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the SupplyQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SupplyQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SupplyQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SupplyQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SupplyQuery
		
	#region UserFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="User"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UserFilters : UserFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UserFilters class.
		/// </summary>
		public UserFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UserFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UserFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UserFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UserFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UserFilters
	
	#region UserQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UserParameterBuilder"/> class
	/// that is used exclusively with a <see cref="User"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UserQuery : UserParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UserQuery class.
		/// </summary>
		public UserQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UserQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UserQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UserQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UserQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UserQuery
		
	#region ProductsCategoryFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsCategory"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsCategoryFilters : ProductsCategoryFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryFilters class.
		/// </summary>
		public ProductsCategoryFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsCategoryFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsCategoryFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsCategoryFilters
	
	#region ProductsCategoryQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsCategoryParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsCategory"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsCategoryQuery : ProductsCategoryParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryQuery class.
		/// </summary>
		public ProductsCategoryQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsCategoryQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsCategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsCategoryQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsCategoryQuery
		
	#region ProductsSimcardFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsSimcard"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsSimcardFilters : ProductsSimcardFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardFilters class.
		/// </summary>
		public ProductsSimcardFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsSimcardFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsSimcardFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsSimcardFilters
	
	#region ProductsSimcardQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsSimcardParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsSimcard"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsSimcardQuery : ProductsSimcardParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardQuery class.
		/// </summary>
		public ProductsSimcardQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsSimcardQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsSimcardQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsSimcardQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsSimcardQuery
		
	#region ProductsBrandFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProductsBrand"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsBrandFilters : ProductsBrandFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsBrandFilters class.
		/// </summary>
		public ProductsBrandFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsBrandFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsBrandFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsBrandFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsBrandFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsBrandFilters
	
	#region ProductsBrandQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProductsBrandParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProductsBrand"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProductsBrandQuery : ProductsBrandParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProductsBrandQuery class.
		/// </summary>
		public ProductsBrandQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProductsBrandQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProductsBrandQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProductsBrandQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProductsBrandQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProductsBrandQuery
		
	#region NewsImageFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="NewsImage"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsImageFilters : NewsImageFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsImageFilters class.
		/// </summary>
		public NewsImageFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsImageFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsImageFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsImageFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsImageFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsImageFilters
	
	#region NewsImageQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="NewsImageParameterBuilder"/> class
	/// that is used exclusively with a <see cref="NewsImage"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsImageQuery : NewsImageParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsImageQuery class.
		/// </summary>
		public NewsImageQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsImageQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsImageQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsImageQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsImageQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsImageQuery
		
	#region OrdersOrderFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="OrdersOrder"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrdersOrderFilters : OrdersOrderFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrdersOrderFilters class.
		/// </summary>
		public OrdersOrderFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrdersOrderFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrdersOrderFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrdersOrderFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrdersOrderFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrdersOrderFilters
	
	#region OrdersOrderQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="OrdersOrderParameterBuilder"/> class
	/// that is used exclusively with a <see cref="OrdersOrder"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrdersOrderQuery : OrdersOrderParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrdersOrderQuery class.
		/// </summary>
		public OrdersOrderQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrdersOrderQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrdersOrderQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrdersOrderQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrdersOrderQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrdersOrderQuery
		
	#region NewsItemFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="NewsItem"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsItemFilters : NewsItemFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsItemFilters class.
		/// </summary>
		public NewsItemFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsItemFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsItemFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsItemFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsItemFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsItemFilters
	
	#region NewsItemQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="NewsItemParameterBuilder"/> class
	/// that is used exclusively with a <see cref="NewsItem"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsItemQuery : NewsItemParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsItemQuery class.
		/// </summary>
		public NewsItemQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsItemQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsItemQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsItemQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsItemQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsItemQuery
		
	#region NewsCategoryFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="NewsCategory"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsCategoryFilters : NewsCategoryFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsCategoryFilters class.
		/// </summary>
		public NewsCategoryFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsCategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsCategoryFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsCategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsCategoryFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsCategoryFilters
	
	#region NewsCategoryQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="NewsCategoryParameterBuilder"/> class
	/// that is used exclusively with a <see cref="NewsCategory"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NewsCategoryQuery : NewsCategoryParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NewsCategoryQuery class.
		/// </summary>
		public NewsCategoryQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the NewsCategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NewsCategoryQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NewsCategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NewsCategoryQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NewsCategoryQuery
		
	#region OrdersDetailsFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="OrdersDetails"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrdersDetailsFilters : OrdersDetailsFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsFilters class.
		/// </summary>
		public OrdersDetailsFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrdersDetailsFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrdersDetailsFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrdersDetailsFilters
	
	#region OrdersDetailsQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="OrdersDetailsParameterBuilder"/> class
	/// that is used exclusively with a <see cref="OrdersDetails"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrdersDetailsQuery : OrdersDetailsParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsQuery class.
		/// </summary>
		public OrdersDetailsQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrdersDetailsQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrdersDetailsQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrdersDetailsQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrdersDetailsQuery
		
	#region OrderImportFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="OrderImport"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrderImportFilters : OrderImportFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrderImportFilters class.
		/// </summary>
		public OrderImportFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrderImportFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrderImportFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrderImportFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrderImportFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrderImportFilters
	
	#region OrderImportQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="OrderImportParameterBuilder"/> class
	/// that is used exclusively with a <see cref="OrderImport"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrderImportQuery : OrderImportParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrderImportQuery class.
		/// </summary>
		public OrderImportQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrderImportQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrderImportQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrderImportQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrderImportQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrderImportQuery
		
	#region UserLogFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UserLog"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UserLogFilters : UserLogFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UserLogFilters class.
		/// </summary>
		public UserLogFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UserLogFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UserLogFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UserLogFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UserLogFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UserLogFilters
	
	#region UserLogQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UserLogParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UserLog"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UserLogQuery : UserLogParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UserLogQuery class.
		/// </summary>
		public UserLogQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UserLogQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UserLogQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UserLogQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UserLogQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UserLogQuery
		
	#region OrderImportDetailFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="OrderImportDetail"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrderImportDetailFilters : OrderImportDetailFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailFilters class.
		/// </summary>
		public OrderImportDetailFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrderImportDetailFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrderImportDetailFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrderImportDetailFilters
	
	#region OrderImportDetailQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="OrderImportDetailParameterBuilder"/> class
	/// that is used exclusively with a <see cref="OrderImportDetail"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class OrderImportDetailQuery : OrderImportDetailParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailQuery class.
		/// </summary>
		public OrderImportDetailQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public OrderImportDetailQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the OrderImportDetailQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public OrderImportDetailQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion OrderImportDetailQuery
	#endregion

	
}
